<template>
  <div>
    <!-- 标题 -->
  <van-nav-bar title="标题" left-arrow @click-left="onClickLeft" />
  <!-- 渲染列表 -->
   <van-card
    v-for="(item, index) in issueList"
    :key="index"
    :price="item.price"
    :desc="item.desc"
    :title="item.title"
    :thumb="`http://liufusong.top:8080` + item.houseImg"
  >
    <template #tags>
      <van-tag
        plain
        type="danger"
        v-for="(item, index) in item.tags"
        :key="index"
      >
        {{ item }}
      </van-tag>
    </template>
  </van-card>
  </div>
</template>

<script>
import { PublishedApi } from '@/api'
export default {
  data () {
    return {
      issueList: []
    }
  },
  async created () {
    const res = await PublishedApi()
    console.log(res)
    this.issueList = res.data.body
  },
  methods: {
    // 标题返回按钮
    onClickLeft () {
      this.$router.back()
    }
  }
}
</script>

<style scoped lang="less">
/deep/.van-nav-bar__content {
  background-color: green;
}
/deep/.van-nav-bar__title {
  color: #fff;
}
</style>
